<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改查询直播房间')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-Stream-edit" th:object="${liveStream}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">直播开始时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="spare3" th:value="${liveStream.spare3}" class="form-control" type="date" >
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">直播结束时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">

                        <input name="spare4" th:value="${liveStream.spare3}" class="form-control" type="date" >
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">是否直播：</label>
                <div class="col-sm-8">
                    <select name="spare2" class="form-control m-b" th:with="type=${@dict.getType('is_seeding')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{spare2}"></option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "live/Stream";
        $("#form-Stream-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-Stream-edit').serialize());
            }
        }

        $("input[name='spare3']").datepicker({
            format: "yyyy-mm-dd",
            autoclose: true
        });

        $("input[name='spare4']").datepicker({
            format: "yyyy-mm-dd",
            autoclose: true
        });
    </script>
</body>
</html>